package com.mall.module.product.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 商品SPU数据传输对象
 */
@ApiModel("商品SPU基本信息")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ProductSpuDTO {
    @ApiModelProperty(value = "商品ID", example = "1")
    private Long id;
    
    @ApiModelProperty(value = "商品名称", required = true, example = "Apple iPhone 14 Pro Max")
    @NotBlank(message = "商品名称不能为空")
    @Size(max = 200, message = "商品名称长度不能超过200字符")
    private String name;

    @ApiModelProperty(value = "分类ID", required = true, example = "123")
    @NotNull(message = "分类不能为空")
    private Long categoryId;

    @ApiModelProperty(value = "品牌ID", example = "456")
    private Long brandId;

    @ApiModelProperty(value = "运费模板ID", example = "789")
    private Long shippingTemplateId;

    @ApiModelProperty(value = "主图URL", required = true, example = "https://example.com/main.jpg")
    @NotBlank(message = "主图不能为空")
    private String mainImage;

    @ApiModelProperty(value = "商品图册(JSON数组)", example = "[\"url1\",\"url2\"]")
    private List<String> albumImages;

    @ApiModelProperty(value = "商品视频URL", example = "https://example.com/video.mp4")
    private String video;

    @ApiModelProperty(value = "商品描述(富文本)")
    private String description;

    @ApiModelProperty(value = "商品详情(富文本)", required = true)
    @NotBlank(message = "商品详情不能为空")
    private String detail;

    @ApiModelProperty(value = "销售状态: 0-下架,1-上架,2-审核中", example = "1")
    private Integer status = 0;
}